package Ketang0416;

import java.util.Scanner;

public class 预习作业 {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		System.out.println("请输入您的会员号码：");
		int number = in.nextInt();
		if (number > 999 && number < 10000) {
			int a = number % 10;
			int b = number / 10 % 10;
			int c = number / 100 % 10;
			int d = number / 1000 % 10;
			int e = a + b + c + d;
			if (e > 24) {
				System.out.println("恭喜您，您中奖了，奖品是彩电一台。");
			} else if (e <= 24 && e > 20) {
				System.out.println("恭喜您，您中奖了，奖品是电吹风一部。");
			} else if (e <= 20 && e > 16) {
				System.out.println("恭喜您，您中奖了，奖品是餐巾纸一包。");
			} else {
				System.out.println("下次继续努力.");

			}
		} else {
			System.out.println("会员号出错，请重新输入。");
		}

	}

}
